#git commit changes
Explore tagged Tumblr posts
vultrusa · 9 days ago
Text
How to Use git commit to Save Your Changes in Git
Learn how to use the command to record git commit changes in your Git repository. This guide at Vultr complements branch management by helping you effectively track progress and maintain clean project history. Ideal for developers switching or merging branches confidently.
Tumblr media
0 notes
snowshinobi · 1 year ago
Text
dutifully adds -m to every commit command and types out a brief summary of what i fucking did like a good little dev
0 notes
moose-mousse · 6 months ago
Text
Ok. I am going to let you in on a secret about how to make programming projects.
You know how people write really good code? Easy to read, easy to work with, easy to understand and very efficient?
By refactoring.
The idea that you write glorious nice code straight is an insane myth that comes from thinking tutorials is how people actually code.
That is because programming is just writing. Nothing more. Same as all other writing.
The hobbit is ~95000 words.
Do you think Tolkien created the Hobbit by writing 95 thousand words?
Of course not! He wrote many many times that. Storylines that ended up scrapped or integrated in other ways, sections that got rewritten, dialog written again and again as the rest of the story happened. Background details filled in after the story had settled down
Writing. Is. Rewriting.
Coding. Is. Refactoring.
Step 1 in programming is proof of concept. Start with the most dangerous part of your project ( danger = how little experience you have with it * how critical it is for your project to work )
Get it to do... anything.
Make proof of concept code for all the most dangerous parts of the project. Ideally there is only 1 of these. If there is more than 3 then your project is too big. ( yes, this means your projects needs to be TINY )
Then write and refactor code to get a minimum viable pruduct. It should do JUUUUUST the most important critical things.
Now you have a proper codebase. Now everytime you need to expand or fix things, also refactor the code you touch in order to do this. Make it a little bit nicer and better. Write unit tests for it. The works.
After a while, the code that works perfectly and never needs to be touched is hard to read. Which does not matter because you will never read it
And the code that you need to change often is the nicest code in the codebase.
TRYING TO GUESS AHEAD OF TIME WHAT PARTS OF THE CODE WILL BE CHANGED OFTEN IS A FOOLS ERRAND.
( also, use git. Dear god use git and commit no more than 10 lines at once and write telling descriptions for each. GIT shows WHAT you did. YOU write WHY you did it )
Is this how to make your hobby project?
Yes. And also how all good software everywhere is made.
348 notes · View notes
codingquill · 3 months ago
Text
Tumblr media
Welcome back, coding enthusiasts! Today we'll talk about Git & Github , the must-know duo for any modern developer. Whether you're just starting out or need a refresher, this guide will walk you through everything from setup to intermediate-level use. Let’s jump in!
What is Git?
Git is a version control system. It helps you as a developer:
Track changes in your codebase, so if anything breaks, you can go back to a previous version. (Trust me, this happens more often than you’d think!)
Collaborate with others : whether you're working on a team project or contributing to an open-source repo, Git helps manage multiple versions of a project.
In short, Git allows you to work smarter, not harder. Developers who aren't familiar with the basics of Git? Let’s just say they’re missing a key tool in their toolkit.
What is Github ?
GitHub is a web-based platform that uses Git for version control and collaboration. It provides an interface to manage your repositories, track bugs, request new features, and much more. Think of it as a place where your Git repositories live, and where real teamwork happens. You can collaborate, share your code, and contribute to other projects, all while keeping everything well-organized.
Git & Github : not the same thing !
Git is the tool you use to create repositories and manage code on your local machine while GitHub is the platform where you host those repositories and collaborate with others. You can also host Git repositories on other platforms like GitLab and BitBucket, but GitHub is the most popular.
Installing Git (Windows, Linux, and macOS Users)
You can go ahead and download Git for your platform from (git-scm.com)
Using Git
You can use Git either through the command line (Terminal) or through a GUI. However, as a developer, it’s highly recommended to learn the terminal approach. Why? Because it’s more efficient, and understanding the commands will give you a better grasp of how Git works under the hood.
GitWorkflow
Git operates in several key areas:
Working directory (on your local machine)
Staging area (where changes are prepared to be committed)
Local repository (stored in the hidden .git directory in your project)
Remote repository (the version of the project stored on GitHub or other hosting platforms)
Let’s look at the basic commands that move code between these areas:
git init: Initializes a Git repository in your project directory, creating the .git folder.
git add: Adds your files to the staging area, where they’re prepared for committing.
git commit: Commits your staged files to your local repository.
git log: Shows the history of commits.
git push: Pushes your changes to the remote repository (like GitHub).
git pull: Pulls changes from the remote repository into your working directory.
git clone: Clones a remote repository to your local machine, maintaining the connection to the remote repo.
Branching and merging
When working in a team, it’s important to never mess up the main branch (often called master or main). This is the core of your project, and it's essential to keep it stable.
To do this, we branch out for new features or bug fixes. This way, you can make changes without affecting the main project until you’re ready to merge. Only merge your work back into the main branch once you're confident that it’s ready to go.
Getting Started: From Installation to Intermediate
Now, let’s go step-by-step through the process of using Git and GitHub from installation to pushing your first project.
Configuring Git
After installing Git, you’ll need to tell Git your name and email. This helps Git keep track of who made each change. To do this, run:
Tumblr media
Master vs. Main Branch
By default, Git used to name the default branch master, but GitHub switched it to main for inclusivity reasons. To avoid confusion, check your default branch:
Tumblr media
Pushing Changes to GitHub
Let’s go through an example of pushing your changes to GitHub.
First, initialize Git in your project directory:
Tumblr media
Then to get the ‘untracked files’ , the files that we haven’t added yet to our staging area , we run the command
Tumblr media
Now that you’ve guessed it we’re gonna run the git add command , you can add your files individually by running git add name or all at once like I did here
Tumblr media
And finally it's time to commit our file to the local repository
Tumblr media
Now, create a new repository on GitHub (it’s easy , just follow these instructions along with me)
Assuming you already created your github account you’ll go to this link and change username by your actual username : https://github.com/username?tab=repositories , then follow these instructions :
Tumblr media Tumblr media
You can add a name and choose wether you repo can be public or private for now and forget about everything else for now.
Tumblr media
Once your repository created on github , you’ll get this :
Tumblr media
As you might’ve noticed, we’ve already run all these commands , all what’s left for us to do is to push our files from our local repository to our remote repository , so let’s go ahead and do that
Tumblr media
And just like this we have successfully pushed our files to the remote repository
Here, you can see the default branch main, the total number of branches, your latest commit message along with how long ago it was made, and the number of commits you've made on that branch.
Tumblr media
Now what is a Readme file ?
A README file is a markdown file where you can add any relevant information about your code or the specific functionality in a particular branch—since each branch can have its own README.
It also serves as a guide for anyone who clones your repository, showing them exactly how to use it.
You can add a README from this button:
Tumblr media
Or, you can create it using a command and push it manually:
Tumblr media
But for the sake of demonstrating how to pull content from a remote repository, we’re going with the first option:
Tumblr media
Once that’s done, it gets added to the repository just like any other file—with a commit message and timestamp.
However, the README file isn’t on my local machine yet, so I’ll run the git pull command:
Tumblr media
Now everything is up to date. And this is just the tiniest example of how you can pull content from your remote repository.
What is .gitignore file ?
Sometimes, you don’t want to push everything to GitHub—especially sensitive files like environment variables or API keys. These shouldn’t be shared publicly. In fact, GitHub might even send you a warning email if you do:
Tumblr media
To avoid this, you should create a .gitignore file, like this:
Tumblr media
Any file listed in .gitignore will not be pushed to GitHub. So you’re all set!
Cloning
When you want to copy a GitHub repository to your local machine (aka "clone" it), you have two main options:
Clone using HTTPS: This is the most straightforward method. You just copy the HTTPS link from GitHub and run:
Tumblr media
It's simple, doesn’t require extra setup, and works well for most users. But each time you push or pull, GitHub may ask for your username and password (or personal access token if you've enabled 2FA).
But if you wanna clone using ssh , you’ll need to know a bit more about ssh keys , so let’s talk about that.
Clone using SSH (Secure Shell): This method uses SSH keys for authentication. Once set up, it’s more secure and doesn't prompt you for credentials every time. Here's how it works:
So what is an SSH key, actually?
Think of SSH keys as a digital handshake between your computer and GitHub.
Your computer generates a key pair:
A private key (stored safely on your machine)
A public key (shared with GitHub)
When you try to access GitHub via SSH, GitHub checks if the public key you've registered matches the private key on your machine.
If they match, you're in — no password prompts needed.
Steps to set up SSH with GitHub:
Generate your SSH key:
Tumblr media
2. Start the SSH agent and add your key:
Tumblr media
3. Copy your public key:
Tumblr media
Then copy the output to your clipboard.
Add it to your GitHub account:
Go to GitHub → Settings → SSH and GPG keys
Click New SSH key
Paste your public key and save.
5. Now you'll be able to clone using SSH like this:
Tumblr media
From now on, any interaction with GitHub over SSH will just work — no password typing, just smooth encrypted magic.
And there you have it ! Until next time — happy coding, and may your merges always be conflict-free! ✨👩‍💻👨‍💻
93 notes · View notes
serinemisc · 3 months ago
Text
So I came across this recently.
It's funny, because I think I exactly half agree with it. I do rebase-heavy workflows in Git mostly because every single Git client makes merge-based workflows ugly and hard to use. If GitHub simply displayed merges the way it displayed squash-merges, that would eliminate so much of the need for squash-merges.
But I don't think this covers everything. So let me go through every use-case for rebase separately:
git merge --squash
The squash-merge is one of the most popular ways to merge pull requests on GitHub, and it's an abject failure of the Git ecosystem that it's so popular.
When you do a regular merge on a pull request, you are essentially taking a bundle of commits from somewhere else, and putting it on top of your own main branch. It's an extremely linear thing to do.
But if you do that, GitHub's commit log just gets a bunch of commits interspersed throughout, with zero indication where they're from. And the nicer clients, if they do, visualize it as a tree (pronounced "DAG") (pronounced "a huge tangle of curvy lines"):
Tumblr media
This pic is from an article telling you to rebase, and, like, sure, rebasing sure is one way to work around a UI that displays your merges as a huge tangle. But Fossil makes a really good point. Why not instead display your merges as, like, not a huge tangle? git log --first-parent does this (and that's clearly an option in that Git UI), but it should be the default everywhere. And even when expanding the "bundle", the bundled commits should still be grouped together, not interspersed with other commits at essentially random.
The other issue is that, when showing the "tangle of commits", the reason it's so tangled is because it's showing the commits in chronological order of when the commits were made. Which is a completely useless sort order, compared to, say, chronological order of when they arrived in the current branch (i.e. grouping the merged-in commits together). This is why GitHub's rebase-merge is also such a popular alternative to merges.
git pull --rebase
Okay, so. Now you've fixed commit log visualization of merged pull requests. But that's not the only use of rebase! Here's another one: if you're working on some code, and constantly keeping it synced with remote, you'll generate tons of merges that are complete useless noise. Unlike a merged PR, these should ideally be hidden completely, or at least nearly-completely.
Anti-rebase people say that these merges serve the functionality of, like, preserving history. You made one commit when the remote was in this state, and another commit when the remote was in that state, and this is sometimes important history to preserve.
I think they are way overestimating how important that history is (judging by how many people use pull-rebase). I'm fine preserving that history if you can declutter the UIs, but it does require your UI to be able to distinguish between "important" merges (of new features from feature branches) and "unimportant" merges (keeping branches in sync with remotes).
The linked post doesn't talk about this problem at all, so I don't know how well Fossil handles this.
git commit --fixup
That leaves the amend/fixup commit. The link does mention that Fossil supports editing past metadata (e.g. commit message). But sometimes you want to edit the actual changes of a commit.
Now, for a sufficiently published commit, this is a bad idea. But if you have a habit of "commit early, commit often", having 50 bugfix commits makes a commit log really cluttered.
I frequently, like, have to weigh stuff like "is it worth cluttering the commit log to fix one typo in one comment?" for old code. And it would really suck to also have to do that for unpublished code, instead of going in with my trusty rebase scalpel.
git that's all I wanted to say
In conclusion. git rebase is a solution to a number of things that could also be viewed as UI problems, and fixed in other, better ways, and Fossil sure sounds like it's fixed some of them. But some of those UI problems are legitimately hard, and I'm not convinced Fossil fixes all of them, and GitHub extremely has not, so I'm gonna keep rebasing.
41 notes · View notes
drarryspecificrecsdaily · 11 months ago
Text
2024.08.01
Complete fics posted on AO3 this day
1. Come In, the Water's Lovely by @wolfpants [E, 3k]
►In the lush wilderness of Madeira, Harry and Draco reunite.
2. like recognises like by @insomnicazu [T, 4k]
►when potter starts acting exactly like draco before his transition, draco needs to do something. he has to know what terms to use when insulting potter, of course.
3. Meet me at Midnight by ProseMary [T, 15k]
►After days of stalking, Harry overheard Malfoy talking about an important meeting in Prefect's bathroom at midnight. Naturally, he came there to spy. It didn't turn out quite the way he wanted.
4. The power of the chosen mate by Witch1511 [?, 7k]
►His father's past comes to haunt him, but Draco finds refuge in an unexpected Alpha.
5. The Road To Here by @toxikgato [M, 9k]
►Harry's not sure when exactly he went from wanting to break Malfoy's face whenever he saw him to wanting to stuff him full with his pups, but if he were to make an educated guess, he'd say it was about... five minutes after he figured out what wanking was. But still, he was a rational human, he could fight Malfoy during the day and then wank to images of Draco during the night, it was a perfect system… Right until he presented as an alpha and all of his repressed desires bursted out of him like a dam breaking.
6. Sweet Heart, Bitter Blood by syringe [M, 5k] 💗
►Draco is Harry Potter- no, Harry Riddle's betrothed. Together, they summon a version of Harry from an alternate universe where he joined the Order of the Phoenix to kill him and stop him from ever defeating Voldemort in his world. The plan goes to shit when the ritual summons another version of Draco along with him. Turns out the fearsome Harry Riddle's massive soft spot for Draco transcends dimensions.
---
Fest/Exchange
1. every scrap of you (you left them all to me) by Anonymous [E, 54k]
►Twelve years on from the war, Harry finds himself in an endless cycle of bedding Draco Malfoy, and waking up alone. Desperate to understand why Draco won't give him a chance to be something more, he commits to courting the slippery blond git. But there's a reason Draco can't fall for him, and Harry will go to the darkest depths to change that. ★ HD Wireless 2024 | @hd-wireless
82 notes · View notes
etirabys · 4 months ago
Text
81k in a conversation about what size of change a single git commit should encapsulate: I don't have strong opinions about this, though. The one git thing I do have strong feelings about is merge vs rebase. I always rebase if I can.
me: Yeah, I find rebases easier to reason about even though I know the two are really similar.
me: Merging… it's like eukaryotic sex. You shouldn't do it unless you have to.
18 notes · View notes
hd-wireless · 11 months ago
Text
🎶 H/D Wireless Fic 🎶
📻 every scrap of you (you left them all to me) 
🎵 Explicit, 54,191  ❗ Warnings/Tags: Graphic Depictions of Violence, EWE, Falling In Love, Courting, Artist Draco Malfoy, Angst, Hurt/Comfort, Blood Curses, Legilimency, Improper use of Legilimency, Memory Alterations, Memory Magic, Dark Magic, Blood Magic, Grief/Mourning, Temporary Character Loss, Comatose Draco Malfoy, Brief Mention of Mpreg, Brief Suicidal Thoughts, Smoking, Drinking, Anal Sex, Blow Jobs, Public Blow Jobs, Light Dom/sub  🎵 Song Prompt: marjorie by Taylor Swift 
🎵 Summary: 
Twelve years on from the war, Harry finds himself in an endless cycle of bedding Draco Malfoy, and waking up alone. Desperate to understand why Draco won't give him a chance to be something more, he commits to courting the slippery blond git.  But there's a reason Draco can't fall for him, and Harry will go to the darkest depths to change that.
Read on AO3
35 notes · View notes
techav · 2 months ago
Text
On Keeping Good Habits
I, like everyone else with any productive hobby, have more ideas and things I want to try than time and skill to implement them. I'll start on developing something and then either life or that next great idea comes by, then suddenly whatever I was working on is lost to time, usually in some sad partially-implemented state.
For projects like mine, modern source control is a godsend. New idea? Create a branch. If it works out, merge. If it gets abandoned, forever stare wistfully at the branch that went nowhere that can't be deleted because surely inspiration & inclination will one day lead back to it (it won't).
Of course for that to work one has to ... use ... source control.
I have a GitHub account. I have repositories for my projects. I even have some branches for developing new ideas.
My recent multi-user BASIC kernel was developed on a working branch on the repository for that particular homebrew project. And I branched off that to add a supervisor console to the kernel.
And when I got it working I ... went straight into developing a new idea without so much as committing the working version to the development branch.
Once I got the machine running again last week, I had some minor changes I wanted to make to the kernel code. Which of course is when I realized what I had done.
What followed was hours of trying to bring together the last unstable commit and the current incomplete mess. I even pulled out ghidra to disassemble the one good ROM I had to compare against. Hours of reverse-engineering my own project to figure out what I had done, instead of adding the new feature I wanted to add.
All because I hadn't kept up with my repository.
I've cleaned up the mess, and was able to get the code back to compiling byte-by-byte identically to what was on the good ROM. But that time is gone. It's not likely I'll be making the same mistake again any time soon.
Sometimes good habits come from lessons hard learned.
(and the real hell of it is — I use git for my paying job every day and would never make such a mistake there...)
15 notes · View notes
synthapostate · 5 months ago
Text
@lastdaysofwar, Day 24: Commitment (Hermann Gottlieb/Newton Geiszler)
Continued from Day 13 (Aftermath/Groundhog Day/Flowers)
“So, I have some questions about the logistics,” Newton says, holding the ring just out of reach of Hermann’s outstretched hand. Hermann frowns.
“What d’you mean, what logistics? You’ve proposed. I’ve accepted. You know what happens next.” He stretches out until his fingertip just touches the ring that rests so tantalizingly in Newton’s hand. Newton does not oblige.
“What do we put on the invitations?” he asks, staring off into the empty space over Hermann’s shoulder. “Do we do invitations? Do we have to invite people?”
“Newton.”
“Do you want a religious ceremony? Is it okay for you to marry an atheist?”
With a sigh, Hermann drops his hand. He won’t be getting that ring any time soon.
“Are we inviting your family?”
“No,” Hermann says under his breath. It doesn’t matter what he says. Newton isn’t listening.
Hermann settles on the couch and makes a start on eating their romantic, two-person dessert while Newton continues to bombard him with questions.
He had been excited to treat his partner to an anniversary dinner at one of the finest restaurants in Hong Kong. Trust Newton to throw off his romantic plans by being even more romantic, and then to throw that off, as well. The suggestion of takeaway and a night in, managing the proposal with all the trappings but without an audience—that’s perfect. It would have been perfect, if only Newton could allow his own momentum to carry him through
“You have to put the parents’ names on the invites, right?” Newton babbles, still waving the engagement ring aloft. “That’s what Tendo and Allison did, remember? ‘The parents of Allison Marie De Cora invite you to celebrate her marriage to—’ Hermann, which one of us is the bride?”
“We’re both the groom,” Hermann reminds him, mildly concerned that his new fiancé is doing something so out of character as to worry about heteronormative gender roles for an event that, frankly, they both consider a mostly ceremonial indicator of a commitment that already exists. “Newton, this doesn’t change anything, you know. Not about us, who we are.”
“Doesn’t it?” Newton asks wildly. Hermann sets down his spoon with a jolt of surprise.
“Darling, are you nervous?”
“Yeah, of course, why shouldn’t I be? I’m marrying you.”
“And what is that supposed to mean?” Hermann asks, with the slightest edge of frost in his tone.
“Your standards are, like, ridiculously high. It’s a lot to live up to, okay?”
“Oh, Newton.” Dear Newton. As if Hermann could ever truly be disappointed in him. Exasperated, certainly. Driven to distraction, often. But never disappointed.
“Look, I’m just saying, I want to do right by you, okay? Don’t laugh, I just care about you so much, and I want to be a good husband, and I don’t know how to do that, I barely know how to be a person—what if I fuck it up—what if you start to hate me—what if we get divorced—”
“Newton!” Hermann says sharply.
Newt falls silent. Hermann points at the couch cushion beside him.
“Sit.”
Newton sits.
“Newton, I have known you for well over a decade,” Hermann says severely. “I have seen the very worst you have to offer. And I can tell you, with perfect sincerity, that you are no longer capable of surprising me with your bad behavior.”
“Oh my god, you hate me and you think I’m boring!”
“I adore you, you git,” Hermann snaps. “I’ve seen you at your worst and your best, I know you inside and out, you’re the only man I’ll ever love, and there is nothing in this world that could ever entice me to leave you! If anyone is divorcing anyone around here, it’ll be you divorcing me!”
“What, are you on crack?” Newton screeches. “I would never!”
“Then why don’t you prove it? Put the ring on my damn finger and make it official!”
“Fine!” He jams the ring on hard enough to take off a layer of skin at the knuckle. Hermann curls his hand into a fist. It stings, but he has his engagement ring now and it will not be coming off.
“Thank you, Newton!” With that done, Hermann shoves his fiancé back to lie flat on the couch.
“Hot,” Newton says. “But seriously, the logistics? Am I taking your name, are you taking mine, are we hyphenating? You seem like too much of a traditionalist to want two last names.”
“We can talk about this later! For now, I want to put your mouth to better use.” He hesitates a moment. “You’re right, I don’t want to hyphenate.”
“I love y—” Newton begins, but he doesn’t get his sentence out before Hermann tackles him, and keeps him entirely too busy to talk.
TBC…
15 notes · View notes
vultrusa · 10 days ago
Text
Mastering git commit changes: A Developer's Guide
When working with Git, one of the most essential commands you'll use is git commit changes. Whether you're collaborating on large-scale applications or managing personal projects, understanding how to effectively commit changes is crucial for maintaining a clean and traceable project history.
The git commit changes process allows you to record snapshots of your repository. Before you commit, any modifications must be staged using git add. This command tells Git which changes to include in the next commit. Once your desired files are staged, you can use git commit -m "your message" to finalize the commit with a descriptive message explaining what was changed.
Why are commits so important? They help keep your development process organized and provide a detailed timeline of your project’s evolution. Each commit acts like a checkpoint, enabling you to track bugs, review history, or revert to a previous state if necessary.
Best practices recommend making small, logical commits with clear messages. For example, instead of a vague message like “update,” opt for something more specific like “fix login bug in user controller.” This makes collaboration easier and debugging more efficient.
Advanced Git users often use options like git commit -a to automatically stage and commit all tracked files or git commit --amend to revise the last commit. These tools offer flexibility and precision when working with complex codebases.
If you're new to Git or looking to refine your workflow, Vultr offers a detailed guide on how to commit changes in Git. This resource walks you through everything from staging files to writing meaningful commit messages, helping you become more confident and efficient with Git.
Mastering the git commit changes process is more than just typing commands — it's about building reliable, scalable, and maintainable software. Start committing smarter today with Vultr’s step-by-step Git documentation.
0 notes
monk-of-mastery · 10 months ago
Text
[me talking to git like a midwife]
you're doing great! now push! PUSH! that's it, you're almost there! don't stop, I can see the HEAD! that's it, you did it!!
8 commits, 12 changes. a healthy baby branch! it's a miracle to witness every time
21 notes · View notes
moose-mousse · 4 months ago
Text
So I am building a git repository analysis tool in python
The usecase is getting into a new project. The tool is supposed to help with that.
Because that is a bit broad, it does several different things.
The part I am currently working on is what files are being changed. So I have a list of all files
I go through each commit, one at a time. First I half the amount of changes in each file. Then I add the lines added and removed
I think that will show up better than simply the changes. Now... Made it work on a stream today: (Shameless plug: https://www.twitch.tv/moose_mousse_moo ) Next step is to visualize it. I am just now slapping it into a spreadsheet to see that the data looks reasonable. And it does! :D
Tumblr media
But I want something that looks like gource:
Tumblr media
It colors files based on their file extensions. I want them colored based on how often they are USED.
8 notes · View notes
sunny-in-gotham · 1 month ago
Text
A free image hosting solution for AO3 and elsewhere - A Tutorial (mobile-friendly!)
See the demo site made from this template IN ACTION: https://hotlink-archive-template.pages.dev/
This guide is for an easy, mobile-friendly way to host files for hotlinking on AO3 or elsewhere, using github and cloudflare pages.
I've encountered far too many dead links in fanfics and forums simply because a hosting service decided to dump older files, or they decided to change their TOS to no longer allow hotlinking or certain kinds of content (nsfw, fictional graphic content). See Optional Steps for even more options.
This is an easy, barebones way to permanently host images that you don't want deleted unexpectedly or that you can't host elsewhere. (Emphasis on barebones. This will not be a nice portfolio style site. Unless you decide to code that yourself!) You can follow the link above for an example of this type of site.
It is also EASY to upload and use on mobile devices after initial setup!
Tools you will need:
Cloudflare Pages/Workers is a free to use static site hosting service. This will publish your files and make them available online. This will publish your files and make them available online. There is a limit to the amount of data you can upload for free, but you can pay for proper hosting if you want to exceed it.
Github is a code sharing/storage platform. Your files will go here first before being published on Pages. You can edit and upload files through your browser at github.com, or through Github Desktop, a program you install on your computer. There are limits to Github repositories, but they are also generous (suggested 1GB to 5GB per repo).
Basic Setup
1. Create a github account
2. Copy this template repository hotlink-archive-template
Your website will be contained in a repository, a place where all the files and the revision history for your project are stored.
This template repository uses an "Action" (using python) to automatically create a "home" page with an Index of all the files in your repository every time it is updated.
NOTE: I recommend you set your repository to Private. Github's history feature is extensive, so if you have sensitive content or think you might want to delete something later, it will be hard to get rid of it completely once it's been committed and publicly available.
3. Enable Action permissions
In order for the Action script to work, you need to give Actions permission to read and write in your repository.
Within your repository, go to the tab Settings > Actions > General > Workflow Permissions
Tumblr media
4. Create a Cloudflare account
5. Create a Pages (or Workers) project and link it to your Github repository
Your Pages project will create the front end of the site where the images will be displayed. You will be able to link those images to other platforms like AO3.
You can create either a Workers or Pages project by going to Add > Pages (or Workers). Name your project WISELY! This name will be your site's URL.
Workers vs. Pages
Workers is subsuming Pages on Cloudflare and now has all the same static hosting capabilities, in addition to its original server-side processing services. If you'd like to, read more about this.
While Workers has similar capabilities, I recommend Pages for this project. Pages has the added bonus of a cleaner URL if you do not have your own domain: “MySite.pages.dev” in Pages vs Workers' “MySite.username.workers.dev”
You will be prompted to import an existing Git repository. You will need to give it access to your Github to do this.
Tumblr media
Select the repository on your Github you made for your project, then hit "Begin Setup".
Name your project WISELY! This name will be your site's URL.
You do not need to change any settings on the next page, so hit "Save and Deploy". Your image hosting site will now be live!
The URL will be "https://ProjectName.pages.dev". It may take a few minutes to become accessible.
Now you're done with the basic setup!
How to Add files
You can add any files you want to link to on AO3/elsewhere through mobile, desktop browser, or the Github desktop program!
Here is how to do it on Github.com:
Open up the repository that you made (it can be found at github.com/username/repositoryname). You will see a list of folders and files that are in that repository.
Click into the folder "fan-stuff".
In the top right, go Add file > Upload files and drag in the images you want added. You will need to name the images BEFORE you upload them, as there is not an easy renaming feature within Github's browser interface.
In the Commit changes box, choose a title for what action you are doing. This will help you backtrack uploads if needed.
For example, it could be "Uploaded Batman Art". Make sure it's set to "commit directly to the main branch", then commit those changes. This will upload the files.
Now, if you visit your site, you will see your uploaded image under the "fan-stuff" folder!
To embed/link your image, navigate to your file on your Pages site and copy the URL in the address bar. This URL is what you will use to embed your photo (using HTML or "add image as URL" tools some sites have).
Continue onto More Setup to customize your site and implement more advanced settings. See Tips/Troubleshooting if you're running into problems.
More Setup
Perform site customization/advanced setup with Github Desktop on your PC
Github’s web UI is great, but it has major limitations. I highly recommend that you use Github Desktop during the initial setup, as well as when you want to make major organizational changes to your files/site. Once you have everything set, though, you can use Github in your browser to upload whatever files you want to hotlink at the moment.
Download Github Desktop and “clone” (download a copy of) the repository you made.
This is the best time to rename/rearrange folders + files, etc.
There are other methods in the Troubleshooting section if you need, but Github Desktop is by far the easiest way
see Adding/Renaming Folders for important info on how to properly rename/add folders
see About the Index Page for how to customize your Index pages
Once you’re done editing, “push” (upload) all the changes you made to your online Github repository.
Having some sort of text editor like Notepad++ is useful for editing any code, the automatic color-coding is very helpful. You can edit in plain old Notepad as well, it just won’t look as nice.
About the Index Page
The template repository uses a python Action to automatically create an HTML "home" page with an Index of ALL the files in the folder every time it is updated.
This is particularly convenient for mobile use, as you can upload a file, and the python action automatically updates the Index page.
If you don’t want this, just disable the “create-index” Action and delete the .py files. You can just type in the file locations to get to each file, or you can manually maintain an home/Index page yourself, which isn't hard if you know some basic HTML and can remember to do it consistently.
Also note that if you wish to change any of the content on your Index pages, you must edit the "index.py" file, not the "index.html" file. The "index.html" file gets re-written every time the "create-index" Action is run in order to keep the file index up to date.
Adding/Renaming/Deleting Folders
Disclaimer: This is a bit convoluted because I am extremely unqualified to be working with python OR HTML. There’s probably an easy way to do this, but I don’t have the skill to do it, and most of the stuff here is copied from stuff I found around. If you know a better way to do things, please let me know, it’d make my life easier too!
Adding or renaming folders involves some extra steps.
1. The "index.py" file inside the folder needs to be edited to match the parent folder name.
The place you need to do this is found near the top of the file (highlighted below)
Tumblr media
2. Then the outer-most "create-index.py" file needs to be updated to match the new name as well. If you’ve added a new folder, duplicate and adjust the code to match.
The place you need to do this is found at the bottom (highlighted below)
Tumblr media
If you don’t need any folders at all, great! Just delete them and their contents! No need to edit any files. (Don’t delete “index.html” or “create-index.py” or “.github/workflows”!)
If you would like to have these folders for later use, leave them as-is and simply edit the index files.
The relevant lines of code at the bottom of "create-index.py" like in the previous step for renaming folders. You may delete this code, or comment it out (using # at the beginning of a line will make it “invisible” to the computer)
Then, add the folder’s name to the “exclusions” list at the top of the "create-index.py" file so that it doesn’t show up on your Index page (highlighted below)
Tumblr media
You can also use this same concept to create "invisible" files/folders. Any files/folders included in the "exclusions" list in "(create-)index.py" will not be listed on the Index page, however they can still be found through the direct URL to the file.
On the flipside, this means simply hiding the file/folder from the Index page does not get rid of the file from your site. Anyone who has the URL will be able to find that file unless you remove it, or move its location to change the URL
Tips/Troubleshooting
(Re)name your files before uploading
It’s not possible to rename image/media files on Github’s web UI (it is possible with the local Git program). The "create-index" Action lists out the names of your files exactly, so you will end up with ugly strings of numbers and letters on your Index page if you don't rename them, which is terrible to look at and also plain old CONFUSING to navigate.
So if you're uploading on mobile or through Github on browser, name your files with easy to remember and distinctive filenames before you go ahead and upload them. This makes everything much easier, and it makes your Index page look nice :)
My website isn’t updating when I edit my Github repository!
Check to see if your Pages is retrieving from the correct branch, and if it has automatic deployments enabled.
Tumblr media
Can’t see your Github repository when trying to link it on Cloudflare?
Check your Github applications Repository Access settings. Go to your ACCOUNT Settings > Integrations - Applications > Cloudflare > Repository Access
Tumblr media
Index action is failing!
Go back to step 3 in Basic Setup and check if you’ve given Actions permission to read and write. If that’s not the issue, check to see if you’ve set up your "index.py" files correctly. The folder names should correspond to the parent folders, and the "create-index.py" file in the outer-most folder should have the correct folder names at the VERY BOTTOM.
How do I rename a folder (or move a file) in Github’s web UI?
It isn’t possible to directly rename a folder in Github’s web UI, doing it using Git on your computer is the most foolproof way to do it. But there is a way (except for media files).
Go into the folder you want to rename and select a file such as “index.html” and enter the “edit” mode.
Go to the file name and backspace until you can edit the parent folder name as well. This will create a new folder with the new name.
You’ll have to do this to every file in the folder until they’re all in the new folder.
Unfortunately, you can’t do this with media files like png/jpg/etc, because entering the “edit” mode on a photo “breaks” it somehow, and bye-bye image :’) (Don’t worry if this happens, just don’t commit the change or roll it back in your history).
Optional Steps
Make deployment (semi-)Manual
You can play with cloudflare and github to make deployment of your site a manual step you have to trigger, instead of automatic with each commit (default setting). This is a safeguard in case you accidentally make a change or delete something from your github, it won't affect your website.
Deploy w/ Branches
You could do a semi-automatic deployment with a "Production" branch on your github that is separate from the branch you edit. This creates an extra step before anything is published on Cloudflare. A safeguard against accidental changes/deletion of sorts :)
Tumblr media
Go to Settings > Build tab > Branch Control
Choose your Production Branch (MAIN or CLOUDFLARE) and enable (or disable) automatic deployments
If you choose MAIN, every change you commit to MAIN will be published to Pages
If you choose CLOUDFLARE, any changes you make to MAIN will not show up on your Pages site until you Pull from MAIN to CLOUDFLARE
To Pull changes from MAIN to CLOUDFLARE, go to your github repository
Above your files on the Left, you will see a toggle to choose which branch you are on.
Choose Cloudflare. There will be a message like "This branch is 7 commits ahead of, 2 commits behind main." Click "2 commits behind"
Click "Create a Pull Request". Then click "Merge Pull Request". If everything is correct, this should trigger a build on your Cloudflare
Deploy w/ Github Actions
Or you can create a manual command that you have to enter on github to trigger a deployment on cloudflare. If you're paranoid about anything happening to your site due to a mishap on the Github side, this is a safe choice. Unless you manually trigger the command, your Pages site will be completely untouched no matter if something happens to your repo.
This can be done in many ways, I think the most straightforward is with Deploy Hooks (maybe in conjunction with Actions if you want to make it mobile-friendly), and might be a bit complicated, but not too hard to figure out with some Google-fu.
Here’s some links I think will be useful (note: I don’t use this method, so these haven’t been tested)
Manual trigger action tutorial
How to configure Github webooks
Storing Locally instead of on Github
Although this guide is written with Cloudflare's Github integration in mind, particularly for easy online/mobile access, you can also keep your files locally on your PC and directly upload your assets onto your Pages project. This gives you full control over what happens to your files. (Keeping backups is a good idea. You can still use Github Desktop to do this, just keep your repository on your PC.)
Simply clone/download the repository as it is, customize it as you like, and create a NEW Pages project on Cloudflare, using "Direct Upload" to upload your files
Once you have connected a Pages project with Github, there is no way to change the deployment method to Direct Upload or vice versa. Direct Upload is also not available for Workers.
One thing that will NOT work the same is the "create-index" Action that only works on Github.
I have made a "create-index.exe" that will execute the "create-index.py" files in the exact same way as they would work with the Action. You do not have to install python for this to work (if I did everything right). Simply run "create-index.exe" whenever you make a change and want to update the "index.html" files
Remember, this is EXACTLY THE SAME as the "create-index" Action, meaning you have to edit each "index.py" file when you rename folders, add a folder, want to exclude a file from the Index page, etc. (See Adding/Renaming Folders for how to do this)
Find me on Bluesky. Or if you have a problem, open an Issue on this project :)
I'll try to answer your questions as best I can! But really, I am the most amateur of amateurs and figured this all out using Google, so I might not be of much help ^^;
I also recommend Squidge Images (an offshoot of Squidge.org) as a fairly trustworthy alternative. However, Squidge Images does have some additional rules that Squidge does not, and what crosses the line is at their discretion.
I also posted this over on AO3!
5 notes · View notes
souhaillaghchimdev · 3 months ago
Text
How to Build Software Projects for Beginners
Tumblr media
Building software projects is one of the best ways to learn programming and gain practical experience. Whether you want to enhance your resume or simply enjoy coding, starting your own project can be incredibly rewarding. Here’s a step-by-step guide to help you get started.
1. Choose Your Project Idea
Select a project that interests you and is appropriate for your skill level. Here are some ideas:
To-do list application
Personal blog or portfolio website
Weather app using a public API
Simple game (like Tic-Tac-Toe)
2. Define the Scope
Outline what features you want in your project. Start small and focus on the minimum viable product (MVP) — the simplest version of your idea that is still functional. You can always add more features later!
3. Choose the Right Tools and Technologies
Based on your project, choose the appropriate programming languages, frameworks, and tools:
Web Development: HTML, CSS, JavaScript, React, or Django
Mobile Development: Flutter, React Native, or native languages (Java/Kotlin for Android, Swift for iOS)
Game Development: Unity (C#), Godot (GDScript), or Pygame (Python)
4. Set Up Your Development Environment
Install the necessary software and tools:
Code editor (e.g., Visual Studio Code, Atom, or Sublime Text)
Version control (e.g., Git and GitHub for collaboration and backup)
Frameworks and libraries (install via package managers like npm, pip, or gems)
5. Break Down the Project into Tasks
Divide your project into smaller, manageable tasks. Create a to-do list or use project management tools like Trello or Asana to keep track of your progress.
6. Start Coding!
Begin with the core functionality of your project. Don’t worry about perfection at this stage. Focus on getting your code to work, and remember to:
Write clean, readable code
Test your code frequently
Commit your changes regularly using Git
7. Test and Debug
Once you have a working version, thoroughly test it. Look for bugs and fix any issues you encounter. Testing ensures your software functions correctly and provides a better user experience.
8. Seek Feedback
Share your project with friends, family, or online communities. Feedback can provide valuable insights and suggestions for improvement. Consider platforms like GitHub to showcase your work and get input from other developers.
9. Iterate and Improve
Based on feedback, make improvements and add new features. Software development is an iterative process, so don’t hesitate to refine your project continuously.
10. Document Your Work
Write documentation for your project. Include instructions on how to set it up, use it, and contribute. Good documentation helps others understand your project and can attract potential collaborators.
Conclusion
Building software projects is a fantastic way to learn and grow as a developer. Follow these steps, stay persistent, and enjoy the process. Remember, every project is a learning experience that will enhance your skills and confidence!
3 notes · View notes
hd-wireless · 11 months ago
Text
📻🎶 H/D WIRELESS 2024 - WEEKLY WRAP-UP #5
Well here it is! We’re all done and the band has left the stage and the stadium lights have been turned on. We want to thank everyone for their involvement, support, and especially for your cheering!
We’ll be posting the full anonymous masterlist tomorrow, plus our guessing game. And then a week later we'll have Reveals!
But for now, please treat yourself to all of our creations from week 5!
Click here for Spotify (many thanks to @evaeleanor for helping us out there) ❤️ And here for the YouTube playlist.
🎶 H/D Wireless Fic 🎶
📻 Two Houses [E, 11,498]
🎵 Song Prompt: Social Cues by Cage the Elephant  🎵 Summary: Two households, both alike in... meddling Floo connections, apparently?  Draco Malfoy is a highly professional and well-respected Ministry official, with a demanding schedule, a loving son, and—through no fault of his own—a faulty Floo connection that keeps regurgitating the Minister for Magic through his fireplace.
📻 Perpetual Motion, Perpetual Sound [E, 51,165]
🎵 Song Prompt: Perpetual Motion, Perpetual Sound by Lovers  🎵 Summary: Harry Potter can’t sleep.
📻 Closing Time [E, 18,406]
🎵 Song Prompt: 'Closing Time' by 'Semisonic'  🎵 Summary: Draco’s been invited to Neville’s stag party in Bristol, and he's confident he knows what to expect. There’ll be too many Gryffindors, for starters, plus a few humiliating team-building activities, some dodgy clubs, and a truly preposterous level of alcohol consumption.  But… a drunken Harry Potter climbing into Draco's bed when he’s having a wank?  No, he definitely didn't see that coming...
📻 every scrap of you (you left them all to me) [E, 54,191]
🎵 Song Prompt: marjorie by taylor swift  🎵 Summary: Twelve years on from the war, Harry finds himself in an endless cycle of bedding Draco Malfoy, and waking up alone. Desperate to understand why Draco won't give him a chance to be something more, he commits to courting the slippery blond git.  But there's a reason Draco can't fall for him, and Harry will go to the darkest depths to change that.
📻 What are you doing Sunday, baby? [M, 12,034]
🎵 Song Prompt: Disco 2000 by Pulp  🎵 Summary: Draco needs a respectable husband to strengthen his reputation before his in-laws try to take Scorpius from him. Who better than his ex, the independently wealthy, out and proud single father, Harry Potter?
📻 Too Good At Raising Hell [E, 87,462]
🎵 Song Prompt: 'Too Good At Raising Hell' by 'The Struts'  🎵 Summary: When Harry Potter walks into Draco’s nightclub looking like trouble, Draco can’t stop staring. He really ought to train his dick not to react so enthusiastically to red flags, but where would be the fun in that?
37 notes · View notes